import { ApiHideProperty } from "@nestjs/swagger";
import { Type } from "class-transformer";
import { IsNumber, IsOptional } from "class-validator";

export class PaginationDto {
  /**
   * @description: 当前页
   * @return {*}
   */
  @IsOptional()
  @Type()
  @IsNumber()
  public pageNum?: number;

  /**
   * @description: 每页条数
   * @return {*}
   */
  @IsOptional()
  @Type()
  @IsNumber()
  public pageSize?: number;

  /* mysql忽略条数 */
  @ApiHideProperty()
  public skip: number;
  /* mysql返回条数 */
  @ApiHideProperty()
  public take: number;
}
